package com.itheima.array;

import java.util.Scanner;

public class DemoArraySum {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int add = 0;
        int[] arr=new int[5];
        for (int i = 0; i < arr.length; i++) {
            System.out.println("请输入第"+(i+1)+"个整数");
            add = sc.nextInt();
            if(add>=50&&add<=100){
                arr[i]=add;
            }else{
                System.out.println("再输");
                i--;
            }
        }
    }
}
